package com.example.lambda.collection;

import com.alibaba.fastjson.JSON;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

public class ListTest {
    public static void main(String[] args) {
        List<Integer> list = new ArrayList<>();
        for (int i = 0; i < 60; i++) {
            list.add(i);
        }

        List<Integer> collect = list.stream().skip(10 * 0).limit(10).collect(Collectors.toList());
        System.out.println(JSON.toJSONString(collect));
    }
}
